package com.itic.mall.mobile.jpush;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.itic.appbase.framework.common.basevo.ReturnVo;
import com.itic.appbase.framework.utils.JPushUtils;
import com.itic.mall.system.msg.apppush.service.AppPushService;

import cn.jiguang.common.ClientConfig;
import cn.jpush.api.JPushClient;
import cn.jpush.api.push.PushResult;
import cn.jpush.api.push.model.PushPayload;

public class JpushTeat {
	public static void main(String[] args) {
		List<String> a = new ArrayList<String>(6); 
		
		Map<String, Object> params = new HashMap<>();
		params.put("goodsId", "123");
		params.put("type", "1");
		PushResult result = JPushUtils.sendPushSingleAlias("475769555101485d9e5f208c634744ad", "杨帆杨帆杨帆", "哈哈哈哈哈哈\n哈哈哈哈哈哈", params, "a6e85297fad500b282156cae", "d614f07b730facb751c56e70");
		/*ReturnVo returnVo = new ReturnVo();
		JPushClient jpushClient = new JPushClient("a6e85297fad500b282156cae", "d614f07b730facb751c56e70");

		PushPayload load = AppPushService.buildPushObject_all_alias_alert("3e91c8edc0234dffb8ecc30b3045f64a", "11111111111");
		 try {
		    	jpushClient.sendPush(load);
		    	jpushClient.close();
		    	returnVo.setStatus("ok");
		    } catch (Exception e) {
		    	jpushClient.close();
		    	returnVo.setReturnMsg(e.getMessage());
		    }
		 System.out.println(returnVo.getReturnMsg());*/
		//System.out.println(result.statusCode);
	}
}
